<?php

include('../dbconn.php');

if($_REQUEST)
{
	$id 	= $_REQUEST['parent_id'];
	$query  = "select distinct PROVINCIA provincia from COMUNI where REGIONE = '".$id."'";
	$results  = @mysql_query($query)or die(mysql_error());

	echo "R".$results;
	
	if($results)
	{?>
		<select name="sub_category" class="parent">
		<option value="" selected="selected">-- Provincia --</option>
		<?php
		while ($rows = mysql_fetch_assoc(@$results))
		{?>
			<option value="<?php echo $rows['provincia'];?>"><?php echo $rows['provincia'];?></option>
		<?php
		}?>
		</select>	
	<?php	
	}
	else{echo '<label style="padding:7px;float:left; font-size:12px;">No Record Found !</label>';}
}
?>